mod local_cli;

use std::sync::{Arc, Mutex};

use model_graph_types::container::workflow::{CliStatement, WorkflowBlockExecuteResult};

use crate::workflow::context::WorkflowContext;

pub async fn execute(
    statement: &CliStatement,
    context: Arc<Mutex<WorkflowContext>>,
) -> anyhow::Result<WorkflowBlockExecuteResult> {
    //获取主机，根据主机进行分别执行
    if let Some(host) = &statement.host {
        //
    } else {
        return local_cli::execute(statement, context).await;
    }
    Ok(WorkflowBlockExecuteResult::succeed())
}
